<?php
namespace app\admin\controller;
use app\BaseController;
use app\common\controller\Jwts;
use think\facade\Request;
class Base extends BaseController
{
    use \liliuwei\think\Jump; //使用 在所需控制器内引用该扩展即可
    public function __construct()    {
        // 控制器初始化
        $this->islogin();
    }
    //检测登录状态
    protected  function  islogin()    {
       /* $token =  Request::instance()->header('Authorization'); //接受返回的结果
        if (isset($token) && strlen($token)>5){
            $myjwt = new Jwts();
            $checkstate=$myjwt->checkToken($token);
            $res = json_decode($checkstate,true);
            if (!($res['code']=='200')){
                $msg=$res['msg'];
                $this->redirect(url('admin/index/noright', ['msg' =>  $msg]));
            }
        }else{
            $msg='no token';
            $this->redirect(url('admin/index/noright', ['msg' =>  $msg]));
        }*/

    }
}

